{include file="inc/header.html"} 
<script type="text/javascript">
	var ROOT = '{$APP_ROOT}/keupload.php';
</script>
<?php
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/deal_publish.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/deal_publish.js";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/upload_deal_image.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/upload_deal_image.js";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/ajaxupload.js";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/switch_city.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/switch_city.js";
$this->_var['dpagejs'][] = APP_ROOT_PATH."/system/region.js";
$this->_var['dcpagejs'][] = APP_ROOT_PATH."/system/region.js";
?>
<script type="text/javascript" src="{function name="parse_script" v="$dpagejs" c="$dcpagejs"}"></script>
<script type='text/javascript' src='{$APP_ROOT}/admin/public/kindeditor/kindeditor.js'></script>
<div class="blank"></div>

<div class="shadow_bg">
	<div class="wrap white_box">

			<div class="page_title">
			{$deal_item.name}
			</div>
			<div class="switch_nav">
				<ul>
					<li class="current"><a href="{url r="project#edit" p="id=$deal_item.id"}">项目介绍</a></li>		
					<li><a href="{url r="project#add_item" p="id=$deal_item.id"}">回报设置</a></li>					
				</ul>
			</div>
			
			<div class="public_left">
				<form id="project_form" action="{url r="project#save"}" method="post">									
				<div class="form_row">
					<div class="blank15"></div>
					<label class="title w100">项目分类:</label>
					<div class="f_l cate_list">
						{foreach from=$cate_list item="cate_item" key=key}
						<span rel="{$cate_item.id}" {if $cate_item.id eq $deal_item.cate_id}class="current"{/if}>{$cate_item.name}</span>
						{/foreach}
						<input type="hidden" name="cate_id" value="{$deal_item.cate_id}" />
					</div>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">项目名称:</label>
					<input type="text" class="textbox" name="name" value="{$deal_item.name}" />
					<div class="blank1"></div>
					<div class="form_tip">不超过25个字</div>
					<div class="blank15"></div>
				</div>

				<div class="form_row">
					<label class="title w100">发起地点:</label>
					<div class="select_box">
					<select name="province">				
					<option value="" rel="0">请选择省份</option>			
					{foreach from=$region_lv2 item=region}
						<option value="{$region.name}" rel="{$region.id}" {if $region.selected}selected="selected"{/if}>{$region.name}</option>
					{/foreach}
					</select>
					
					<select name="city">				
					<option value="" rel="0">请选择城市</option>
					{foreach from=$region_lv3 item=region}
						<option value="{$region.name}" rel="{$region.id}" {if $region.selected}selected="selected"{/if}>{$region.name}</option>
					{/foreach}
					</select>
					</div>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">简要说明:</label>
					<textarea name="brief" class="textarea">{$deal_item.brief}</textarea>
					<div class="blank1"></div>
					<div class="form_tip">不超过75个字，简要描述一下你的项目</div>
					<div class="blank15"></div>
				</div>
				
				<div class="form_row">
					<label class="title w100">封面图片:</label>
					<div class="f_l">
						<label class="fileupload" onclick="upd_file(this,'image_file');">
						<input type="file" class="filebox" name="image_file" id="image_file"/>						
						</label>
						<label class="fileuploading hide" ></label>
						
					</div>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">视频地址:</label>
					<input type="text" value="{$deal_item.vedio}" class="textbox"  name="vedio" />
					<div class="blank1"></div>
					<div class="form_tip">我们非常建议你提交一段几分钟的宣传视频。 支持土豆，优酷，酷六。</div>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">详细说明:</label>
					<div class="ke_form f_l">
					{function name="show_ke_form" text_name="descript" width="470" height="300" ctn="$deal_item.description"}		
					</div>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">目标金额:</label>
					<input type="text" value="{function name="round" v=$deal_item.limit_price e=2}" class="textbox" name="limit_price" style="width:100px;" /> <label class="tip_box">元</label>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">上线天数:</label>
					<input type="text" value="{$deal_item.deal_days}" class="textbox" name="deal_days" style="width:100px;" /> <label class="tip_box">天</label>
					<div class="blank15"></div>
				</div>
				<div class="form_row">
					<label class="title w100">常见问题:<br /> <a href="javascript:void(0);" id="add_faq" class="linkgreen">添加</a></label>
					<div style="float:left; width:500px;" id="faq_list">
						{if $deal_item.faq_list}
						{foreach from=$deal_item.faq_list item=faq_item}
						{include file="inc/deal_faq_item.html"}			
						{/foreach}		
						{else}
						{include file="inc/deal_faq_item.html"}
						{/if}
					</div>
					<div class="blank15"></div>
				</div>
				<div class="submit_btn_row">
					<input type="hidden" name="image" value="{$deal_item.image}" />
					<input type="hidden" name="savenext" value="0" />
					<div class="ui-button gray" rel="gray" id="savenow">
						<div>
							<span>先保存一下</span>
						</div>
					</div>
					<div class="ui-button green" rel="green" id="savenext" style="margin-left:5px;">
						<div>
							<span>下一步</span>
						</div>
					</div>
					<input type="hidden" value="1" name="ajax" />
					<input type="hidden" name="id" value="{$deal_item.id}" />
					<div class="blank15"></div>
				</div>
				
			</form>
				
			</div>
			
			<div class="public_right">
				<div class="deal_preview_title">编辑预览</div>
				<div class="blank"></div>
				<div class="deal_item_box">
					<div class="deal_content_box">
					<img id="image" src="{if $deal_item.image eq ''}{$TMPL}/images/empty_thumb.gif{else}{function name="get_spec_image" v=$deal_item.image w="205" h="160" g="1"}{/if}" />
					<div class="blank"></div>
					<a href="#" class="deal_title" id="deal_title">{$deal_item.name}</a>
					<div class="blank"></div>
					{$user_info.user_name}&nbsp;&nbsp;(<span id="province">{$deal_item.province}</span><span id="city">{$deal_item.city}</span>)
					<div class="blank"></div>
					<div id="deal_brief">{$deal_item.brief}</div>
					</div>
					<div class="deal_item_dash"></div>
					<div class="deal_content_box">
						<div class="ui-progress">
							<span style="width:100%;"></span>
						</div>
						<div class="blank"></div>
						<div class="div3"><span class="num">100%</span><span class="til">达到</span></div>
						<div class="div3"><span class="num" ><font id="price">{function name="round" v=$deal_item.limit_price e=2}</font>元</span><span class="til">金额</span></div>
						<div class="div3"><span class="num"><font id="deal_days">{$deal_item.deal_days}</font>天</span><span class="til">剩余时间</span></div>
						<div class="blank1"></div>
					</div>
				</div>
				
				
				
			</div>
			<div class="blank"></div>
			
	
	</div>
</div>

<div class="blank"></div>
{include file="inc/footer.html"} 


